package com.xmg.controller;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @Author: mazhongqing
 * @Date: 2020/11/4 13:56
 */
@Data
public class User {
    @NotNull(message = "用户ID不能为空")
    private Long id;

    @NotNull(message = "用户账号不能为空")
    @Size(min = 6,max = 11,message = "账号长度必须为6-11位")
    private String account;

    @NotNull(message = "用户密码不能为空")
    @Size(min = 6,max = 11,message = "密码长度必须为6-11位")
    private String password;

    @NotNull(message = "用户邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;
}
